package com.hospitalmanagementsystem.repository;

import com.hospitalmanagementsystem.entity.Doctor;
import com.hospitalmanagementsystem.entity.Department;
import com.hospitalmanagementsystem.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

@Repository
public interface DoctorRepository extends JpaRepository<Doctor, Long> {
    List<Doctor> findByDepartment(Department department);
    Optional<Doctor> findByUser(User user);
    boolean existsByLicenseNumber(String licenseNumber);
    boolean existsByUser(User user);
} 